﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="MemberProfiles.aspx.vb" Inherits="WeightLossProject.MemberProfiles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2 class="custom-header">Member Profiles</h2>
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="ID" 
    DataSourceID="dsMemberProfiles" GroupItemCount="2">
    <AlternatingItemTemplate>
        <td runat="server" style="background-color: #FFF8DC; padding:20px; width:300px;">
        <br/> <img src='<%# Eval("Picture") %>' width='200px' /><br/>
            Name:<b><asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' /></b>
            <br />
            
            Age:<asp:Label ID="AgeLabel" runat="server" Text='<%# Eval("Age") %>' />
            <br />
            
            Sex:<asp:Label ID="SexLabel" runat="server" Text='<%# Eval("Sex") %>' />
            <br />

            Description:<asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' />
            <br />
            
            Weight:<asp:Label ID="WeightLabel" runat="server" Text='<%# Eval("Weight") %>' />
            <br />
            
            Height:<asp:Label ID="HeightLabel" runat="server" Text='<%# Eval("Height") %>' />
            <br />
            
            email Address:<asp:Label ID="emailAddressLabel" runat="server" Text='<%# Eval("emailAddress") %>' />
            <br />
            
            Website:<asp:Label ID="WebsiteLabel" runat="server" Text='<%# Eval("Website") %>' />
            <br />
        </td>
    </AlternatingItemTemplate>
    <EditItemTemplate>
        <td runat="server" style="background-color: #008A8C; color: #FFFFFF; padding:20px;">
        Pic: <img src='<%# Eval("Picture") %>' width='200px' />
      
            <br />Name:
            <b><asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' /></b>
            <br />Age:
            <asp:TextBox ID="AgeTextBox" runat="server" Text='<%# Bind("Age") %>' />
            <br />Sex:
            <asp:TextBox ID="SexTextBox" runat="server" Text='<%# Bind("Sex") %>' />
            <br />Picture:
            <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
            <br />Description:
            <asp:TextBox ID="DescriptionTextBox" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />Weight:
            <asp:TextBox ID="WeightTextBox" runat="server" Text='<%# Bind("Weight") %>' />
            <br />Height:
            <asp:TextBox ID="HeightTextBox" runat="server" Text='<%# Bind("Height") %>' />
            <br />emailAddress:
            <asp:TextBox ID="emailAddressTextBox" runat="server" 
                Text='<%# Bind("emailAddress") %>' />
            <br />Website:
            <asp:TextBox ID="WebsiteTextBox" runat="server" Text='<%# Bind("Website") %>' />
            <br />
            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                Text="Update" />
            <br />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Cancel" />
            <br />
        </td>
    </EditItemTemplate>
    <EmptyDataTemplate>
        <table runat="server" 
            style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;">
            <tr>
                <td>
                    No data was returned.</td>
            </tr>
        </table>
    </EmptyDataTemplate>
    <EmptyItemTemplate>
<td runat="server" />
    </EmptyItemTemplate>
    <GroupTemplate>
        <tr ID="itemPlaceholderContainer" runat="server">
            <td ID="itemPlaceholder" runat="server">
            </td>
        </tr>
    </GroupTemplate>
    <InsertItemTemplate>
        <td runat="server" style="padding:20px;">
            <br />Name:
            <b><asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' /></b>
            <br />Age:
            <asp:TextBox ID="AgeTextBox" runat="server" Text='<%# Bind("Age") %>' />
            <br />Sex:
            <asp:TextBox ID="SexTextBox" runat="server" Text='<%# Bind("Sex") %>' />
            <br />Picture:
            <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
            <br />Description:
            <asp:TextBox ID="DescriptionTextBox" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />Location:
            <asp:TextBox ID="LocationTextBox" runat="server" 
                Text='<%# Bind("Location") %>' />
            <br />Weight:
            <asp:TextBox ID="WeightTextBox" runat="server" Text='<%# Bind("Weight") %>' />
            <br />Height:
            <asp:TextBox ID="HeightTextBox" runat="server" Text='<%# Bind("Height") %>' />
            <br />emailAddress:
            <asp:TextBox ID="emailAddressTextBox" runat="server" 
                Text='<%# Bind("emailAddress") %>' />
            <br />Website:
            <asp:TextBox ID="WebsiteTextBox" runat="server" Text='<%# Bind("Website") %>' />
            <br />
            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                Text="Insert" />
            <br />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Clear" />
            <br />
        </td>
    </InsertItemTemplate>
    <ItemTemplate>
        <td runat="server" style="background-color: #DCDCDC; color: #000000; padding:20px;">
         <br/> <img src='<%# Eval("Picture") %>' width='200px' />
            <br />
            Name:<b><asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' /></b>
            <br />
            
            Age:<asp:Label ID="AgeLabel" runat="server" Text='<%# Eval("Age") %>' />
            <br />
            
            Sex:<asp:Label ID="SexLabel" runat="server" Text='<%# Eval("Sex") %>' />
            <br />

            Description:<asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' />
            <br />
            
            Location:<asp:Label ID="LocationLabel" runat="server" Text='<%# Eval("Location") %>' />
            <br />
            
            Weight:<asp:Label ID="WeightLabel" runat="server" Text='<%# Eval("Weight") %>' />
            <br />
            
            Height:<asp:Label ID="HeightLabel" runat="server" Text='<%# Eval("Height") %>' />
            <br />
            
            email Address:<asp:Label ID="emailAddressLabel" runat="server" Text='<%# Eval("emailAddress") %>' />
            <br />
            
            Website:<asp:Label ID="WebsiteLabel" runat="server" Text='<%# Eval("Website") %>' />
            <br />

        </td>
    </ItemTemplate>
    <LayoutTemplate>
        <table runat="server">
            <tr runat="server">
                <td runat="server">
                    <table ID="groupPlaceholderContainer" runat="server" border="1" 
                        style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; font-family: Verdana, Arial, Helvetica, sans-serif;">
                        <tr ID="groupPlaceholder" runat="server">
                        </tr>
                    </table>
                </td>
            </tr>
            <tr runat="server">
                <td runat="server" 
                    style="text-align: center; background-color: #CCCCCC; font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000;">
                    <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                ShowLastPageButton="True" />
                        </Fields>
                    </asp:DataPager>
                </td>
            </tr>
        </table>
    </LayoutTemplate>
    <SelectedItemTemplate>
        <td runat="server" 
            style="background-color: #008A8C; font-weight: bold; color: #FFFFFF; padding:20px;">
            <br />
            <asp:Label ID="PictureLabel" runat="server" Text='<%# Eval("Picture") %>' />
            <br />Name:
            <b><asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' /></b>
            <br />Age:
            <asp:Label ID="AgeLabel" runat="server" Text='<%# Eval("Age") %>' />
            <br />Sex:
            <asp:Label ID="SexLabel" runat="server" Text='<%# Eval("Sex") %>' />
            <br />Description:
            <asp:Label ID="DescriptionLabel" runat="server" 
                Text='<%# Eval("Description") %>' />
            <br />Location:
            <asp:Label ID="LocationLabel" runat="server" Text='<%# Eval("Location") %>' />
            <br />Weight:
            <asp:Label ID="WeightLabel" runat="server" Text='<%# Eval("Weight") %>' />
            <br />Height:
            <asp:Label ID="HeightLabel" runat="server" Text='<%# Eval("Height") %>' />
            <br />emailAddress:
            <asp:Label ID="emailAddressLabel" runat="server" 
                Text='<%# Eval("emailAddress") %>' />
            <br />Website:
            <asp:Label ID="WebsiteLabel" runat="server" Text='<%# Eval("Website") %>' />
            <br />
        </td>
    </SelectedItemTemplate>
</asp:ListView>
<asp:SqlDataSource ID="dsMemberProfiles" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
    SelectCommand="SELECT * FROM [Profiles]"></asp:SqlDataSource>
</asp:Content>
